-- GENERATED SPELL FOR [Deranged Indu'le Villager] --


function spell0_26411(pUnit, Event) --@Deranged Tantrum,Self--
pUnit:FullCastSpellOnTarget(51781,pUnit)
pUnit:RegisterEvent('Sorts_26411', 3000, 1)
end

function spell1_26411(pUnit, Event) --@Deranged Tantrum,n/a--
pUnit:FullCastSpellOnTarget(51782,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26411', 616, 1)
end

function Sorts_26411(pUnit, Event)
local choix_sorts_26411 = math.random(0, 1)
if choix_sorts_26411 == 0 then
pUnit:RegisterEvent('spell0_26411', 1, 1)
end
if choix_sorts_26411 == 1 then
pUnit:RegisterEvent('spell1_26411', 1, 1)
end
end

function mob26411_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26411', math.random(1500, 3000), 1)
end

function mob26411_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26411_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26411_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26411, 1, 'mob26411_Action')
RegisterUnitEvent(26411, 2, 'mob26411_Leave')
RegisterUnitEvent(26411, 3, 'mob26411_Kill')
RegisterUnitEvent(26411, 4, 'mob26411_Die')
